酒店房型房价抓取 | 百度->商户
更新时间:2024-04-28
酒店房态/房价查询【百度即时请求商户】
功能:查询酒店下所有物理房型的所有价格/库存计划,一个物理房型可以有多个价格/库存计划,支持查询未来90天的房价、房态,因为数据量考虑,单次查询不超过30天;
method: http get
查询请求参数:
字段名 | 类型 | 必填 | 释义 | |
---|---|---|---|---|
1 | tid | string | 是 | 酒店id |
2 | start | string | 是 | 起始时间 例:2021-09-01 |
3 | end | string | 是 | 截止时间 例:2021-09-01 |
4 | 公共参数 | - | 是 | 公共参数参考公共参数部分 |
返回字段说明:
字段标签 | 字段名称 | 字段说明 | 字段要求 | 长度 | 是否必须 | |
---|---|---|---|---|---|---|
1 | start | 入住时间 | 入住时间,例:2021-09-01 00:00:00 | string | 64 | 是 |
2 | end | 离店时间 | 离店时间,例:2021-09-02 00:00:00 | string | 64 | 是 |
3 | content | 物理房型内容 | 物理房型内容 | object | - | 是 |
4 | content.{ROOM_TYPE_ID} | 物理房型唯一标识 | 物理房型唯一标识,例如content.TR1 | string | 64 | 是 |
5 | content.{ROOM_TYPE_ID}.price_info | 单个物理房型的价格/库存计划列表 | 单个物理房型的价格/库存计划列表 | array | - | 是 |
6 | room_type_name | 物理房型名称 | 物理房型名称,例如:大床房、高级大床房(注意除了房型名称外,不要包含床型等其他信息) | string | 128 | 是 |
7 | room_type_show_name | 逻辑房型展示名称 | 例如:无早 大床1.8m|免费取消 快速确认,该字段用于聚合房价展示,作为room_type_name的补充 | string | 64 | 是 |
8 | bed_type_name | 床型 | 只提供床型即可,例如:大床、双床 | string | 64 | 是 |
9 | cancel_policy | 取消政策 | 1:免费取消;2:限时取消 以last_cancel_time分界,last_cancel_time以前免费取消,之后按取消规则扣费,cancel_cut_type为1,cancel_cut_value传具体金额,cancel_cut_type为3,cancel_cut_value传首晚金额,24:00之后不可取消;3:不可取消 last_cancel_time为"",cancel_cut_type和cancel_cut_value均为0;4:付费取消 以last_cancel_time分界,last_cancel_time以前付费取消,cancel_cut_type为1,cancel_cut_value传具体金额,cancel_cut_type为3,cancel_cut_value传首晚金额,last_cancel_time之后不可取消;5:30分钟取消 以last_cancel_time分界,last_cancel_time以前免费取消,之后按取消规则扣费,last_cancel_time为"",cancel_cut_type和cancel_cut_value传30分钟后对应扣费规则; | int | - | 是 |
10 | confirm_policy | 确认政策 | 1:立即确认; 2:快速确认; 3:不确定确认政策 | int | - | 是 |
11 | payment_type | 支付方式 | 参考附录payment_type部分 | int | - | 是 |
12 | bd_book_type | 房态 | 房态,具体取值参考附录bd_book_type部分 | int | - | 是 |
13 | pt_type | 价格优惠类型 | 0:无优惠; 1:直减优惠; 2:返现; 3:税费 | int | - | 是 |
14 | gift_id | 酒套ID | 酒套ID,唯一标识 | string | 64 | 否 |
15 | is_promotion | 是否促销中 | 是否促销中,取值 T:促销中,F非促销中 | string | 64 | 是 |
16 | promotion_info | 促销信息 | 促销信息,文本 | object | - | 否 |
17 | is_hour_room | 小时房 | 是否是小时房 T:是 F:否 | string | 64 | 否 |
18 | hour_room_info | 小时房信息 | 小时房信息,json结构,定义小时房详细信息 | string | 512 | 否 |
19 | can_checkin_start | 小时房入住时间 | 小时房入住时间 例:10:00 为当日10:00后可入住 | string | 64 | 否 |
20 | can_checkin_end | 小时房退房时间 | 小时房退房时间 例:23:00 为当日23点前可退房,如有次日退房为退房时间 + 24:00 如次日10:00退房传34:00 | string | 64 | 否 |
21 | hourage | 小时房入住时间跨度 | 单位小时 | int | - | 否 |
22 | activity_id | 价格计划id | 价格计划唯一标识,一个物理房型可以有多个价格计划,对应不同的价格政策 | string | 64 | 是 |
23 | booking_ext | 预定附加信息 | 预定附加信息 | object | - | 是 |
24 | invoice_mode | 发票模式 | 详见发票模式详情 | int | - | 是 |
25 | min_days | 最小入住天数 | 默认:1 ,最小:1, 最大:90,最小入住天数,默认1,小时房设置为1 | int | - | 否 |
26 | max_days | 最大入住天数 | 默认:90, 最小:1 ,最大:90,最大入住天数(1-90),默认90,小时房设置为1 | int | - | 否 |
27 | min_adv_hours | 最小提前预定小时数 | 默认:0,最小:0 ,最大:2160,最小提前预定小时数,从入住当天的24点往前算。例如:如果这个字段设置为48,代表至少提前两天预定,那么如果想预定24好入住,必须在23号0点前下单; | int | - | 否 |
28 | max_adv_hours | 最大提前预定小时数 | 默认:2160,最小:0,最大2160,最大提前预定小时数,从入住当天的24点往前算。例如:如果这个字段设置为48,代表至少提前两天预定,那么如果想预定24好入住,必须在23号0点前下单; | int | - | 否 |
29 | start_time | 产品每日开始销售时间 | 默认值:00:00,最大长度5,产品每日开始销售时间,start_time一定为当天时间 | string | 5 | 否 |
30 | end_time | 产品每日结束销售时间 | 产品每日结束销售时间,凌晨房传24:00+次日时间,比如00:00-次日04:00,end_time传28:00 | string | 5 | 否 |
31 | cancel_cut_type | 扣费类型 | 0:不扣费;1:金额;2:比例;3:首晚房费; | int | - | 是 |
32 | cancel_cut_value | 扣费值 | type:1, cancel_cut_value:5000(分) 金额 type:2, cancel_cut_value:80(%)比例 1-100 | int | - | 是 |
33 | last_cancel_time | 最晚取消时间 | 最晚取消时间,例如:2021-09-02 11:00:00,对于cancel_policy=2的情况,该字段可用英文“;”分隔表示的条件取消政策,例如:2021-08-31 17:00前支付,18:00前可免费取消;17:00后支付,支付一小时内也可免费取消;支付后房间为您保留整晚 | string | 128 | 是 |
34 | price_models | 价格表 | 90天价格表 | object | - | 是 |
35 | date | 日期 | 日期 例:2021-09-01 | string | 64 | 是 |
36 | stock_count | 剩余可预订房量 | 该价格计划下,该物理房型的剩余房量 | int | - | 是 |
37 | market_price | 市场价\原价\划线价 | 市场价\原价\划线价,单位分 | int | - | 是 |
38 | tp_discount_price | 商户折扣价 | 售价,单位分 | int | - | 是 |
39 | vip_price | vip会员价 | 指定用户会员等级的会员价,若无会员价,填0,单位分 | int | - | 是 |
40 | discount_value | 折扣值 | 若:vip_price>0 则:discount_value=market_price-vip_price,若vip_price=0 则:discount_value=market_price-tp_discount_price,单位分 | int | - | 是 |
41 | breakfast | 早餐 | 取值:-1: 不确定有没有早餐; 0:无早; 1:1份早餐; 2:2份早餐; 3:3份早餐; 4:4份早餐; 依次类推 | int | - | 是 |
42 | invoice_type | 发票内容 | 取值:1:代订住宿费 2:代订房费 | int | - | 是 |
43 | invoice_type_num | 支持的发票类型 | 取值:1:电子普通发票 2:纸质普通发票 3:纸质专用发票 如果是多类型,英文逗号分隔,示例: 1,2,3 | string | - | 是 |
44 | activity_type | 价格计划类型 | 0:默认; 1:商旅低价;2:底价加价 | int | - | 否 |
45 | label_set | 标签集合 | 取值:2进制数,第一位是否屏蔽本异地 0不屏蔽 1屏蔽 | int | - | 否 |
发票模式详情:
invoice_mode | 详情描述 |
---|---|
1 | 酒店开具发票,前端展示为:入住后可在酒店前台开票; |
2 | 商户开具发票,注意在填单页将开票信息,提交给商户(不可开专票)只支持电子,前端展示为:下单后需联系供应商开具发票,该订单服务商无法开具专票,请您确认后下单; |
3 | 商户开具发票,通过客服电话联系供应商,前端展示为:下单后需联系供应商开具发票,该订单下单后需电话联系供应商开具开票 xxxx(供应商客服电话); |
4 | 商户开具发票,注意在填单页将开票信息 提交给商户(可开专票)不收取邮费;,前端展示为:下单后需联系供应商开具发票; |
5 | 商户开具发票,注意在填单页将开票信息,提交给商户,可开专票收取邮费,前端展示为:下单后需联系供应商开具发票,该订单服务商开具专票需收取邮费; |
6 | 商户开具发票,注意在填单页将开票信息,提交给商户(不可开专票)只支持邮寄不收取邮费,前端展示为:下单后需联系供应商开具发票,该订单服务商无法开具专票,请您确认后下单; |
7 | 商户开具发票,注意在填单页将开票信息,提交给商户(不可开专票)只支持邮寄收取邮费,前端展示为:下单后需联系供应商开具发票需收取邮费,该订单服务商无法开具专票,请您确认后下单; |
查询接口返回样例:
(注:查询字段类型请按照上述字段说明正确返回)
{
"content": {
"TR1": {
"price_info": [
{
"room_type_name": "大床房A",
"room_type_show_name": "无早 大床|条件取消",
"bed_type_name": "双床",
"cancel_policy": 2,
"confirm_policy": 1,
"payment_type": 3,
"bd_book_type": 1,
"pt_type": 0,
"gift_id": [
],
"is_promotion": "T",
"promotion_info": [
],
"is_hour_room": "F",
"hour_room_info": {
"can_checkin_start": "10:00",
"can_checkin_end": "20:00",
"hourage": 4
},
"activity_id": 318120001,
"activity_type": 1,
"label_set": 1, //屏蔽本地 0不屏蔽本地
"booking_ext": {
"min_days": 1,
"max_days": 90,
"min_adv_hours": 0,
"max_adv_hours": 2160,
"start_time": "00:00",
"end_time": "00:00"
},
"invoice_mode": "1",
"invoice_type": "1",
"invoice_type_num": "1,2,3",
"price_models": [
{
"date": "2021-09-02",
"last_cancel_time": "2021-09-02 11:00:00",
"cancel_cut_type": 0,
"cancel_cut_value": 0,
"stock_count": 2,
"market_price": 5000,
"tp_discount_price": 4800,
"vip_price": 0,
"discount_value": 200,
"breakfast": 1
},
{
"date": "2021-09-03",
"last_cancel_time": "2021-09-02 11:00:00",
"cancel_cut_type": 1,
"cancel_cut_value": 500,
"stock_count": 2,
"market_price": 5000,
"tp_discount_price": 4800,
"vip_price": 0,
"discount_value": 200,
"breakfast": 1
},
{
"date": "2021-09-04",
"last_cancel_time": "2021-09-02 11:00:00",
"cancel_cut_type": 2,
"cancel_cut_value": 50,
"stock_count": 2,
"market_price": 5000,
"tp_discount_price": 4800,
"vip_price": 0,
"discount_value": 200,
"breakfast": 1
}
]
}
]
},
"DR1": {
"price_info": [
{
"last_cancel_time": "2021-09-02 11:00:00",
"room_type_name": "大床房B",
"room_type_show_name": "无早 大床|条件取消",
"bed_type_name": "双床",
"cancel_policy": 1,
"confirm_policy": 1,
"payment_type": 3,
"bd_book_type": 1,
"pt_type": 0,
"gift_id": [
],
"is_promotion": "T",
"promotion_info": [
],
"is_hour_room": "F",
"hour_room_info": {
"can_checkin_start": "10:00",
"can_checkin_end": "20:00",
"hourage": 4
},
"activity_id": 318120001,
"booking_ext": {
"min_days": 1,
"max_days": 90,
"min_adv_hours": 0,
"max_adv_hours": 2160,
"start_time": "00:00",
"end_time": "00:00"
},
"invoice_mode": "1",
"invoice_type": "1",
"invoice_type_num": "1,2,3",
"price_models": [
{
"date": "2021-09-02",
"last_cancel_time": "2021-09-02 11:00:00",
"stock_count": 2,
"market_price": 5000,
"tp_discount_price": 4800,
"vip_price": 0,
"discount_value": 200,
"breakfast": 1
},
{
"date": "2021-09-03",
"last_cancel_time": "2021-09-02 11:00:00",
"stock_count": 2,
"market_price": 5000,
"tp_discount_price": 4800,
"vip_price": 0,
"discount_value": 200,
"breakfast": 1
},
{
"date": "2021-09-04",
"last_cancel_time": "2021-09-02 11:00:00",
"stock_count": 2,
"market_price": 5000,
"tp_discount_price": 4800,
"vip_price": 0,
"discount_value": 200,
"breakfast": 1
}
]
}
]
}
}
}